## Learning of N-Counter
This example represents a counter circuit with reset button. This is a deterministic Moore machine but here, we try to model it as a Mealy machine. There are only two inputs "INC" (to increment) and "DEC" (to decrement) and the outputs represent the current value between 0 to MAX. The model is a chain.


The goals of this example are to show:
- How to develop a "blackbox mealy machine"
- How to use the black box mealy machine to create a real oracle
- How to use a learner
- How to visualize/export a Mealy machine

For "5-Counter", the generated outputs present in the directory. 
### By writing code

**Step 1.** Compile the LearnCounter.cs

**Step 2.** Run it!

### By using the command-line utility tools

**Step 1.** Compile the Counter.cs

For example, in Mono/Linux, assuming the *SMLib_DIR* is the directory of State-Model library (i.e. *SMLib.dll*):

*dmcs -r:$SMLib_DIR/SMLib.dll -t:library -out:Counter.dll Counter.cs*

**Step 2.** Run the SUL

For example, in Mono/Linux, assuming the *SULEXEC_DIR* is the directory of SUL-executor (i.e. *SysExec.exe*):

*sudo $SULEXEC_DIR/SysExec.exe -t MealyMachine -c LearningApp.Examples.Counter -l Counter.dll*

**Step 3.** Run the learner (in another window)

For example, in Mono/Linux, assuming the *LEARNIT_DIR* is the directory of Learner utility (i.e. *LearnIt.exe*):

*$LEARNIT_DIR/LearnIt.exe*
